package com.smf.lsc.global.id.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import com.smf.lsc.global.id.GlobalId;

/***
 * 全局ID-启动装载，提升性能
 * @author ln 2021-11-30
 *
 */
@Component
public class GlobalIdInitRunnerImpl implements ApplicationRunner {
	
	private final String GLOBALID_KEY="globalId";
	
	@Autowired
	private GlobalId globalId;
	
    @Override
    public void run(ApplicationArguments args) throws Exception {
    	globalId.getId(GLOBALID_KEY);
    }
}